// CherryMerry ( Mikhail Tomilenko ), Reverse Entertainment, 2021-2024


#include "../Public/Health.h"

#include <Kismet/KismetMathLibrary.h>
#include "Components/ProgressBar.h"
#include "Components/TextBlock.h"

void UHealth::UpdateWidgetInfo(float CurrentHealth, float MaxHealth)
{
	TextBlock_CurrentHealth->SetText(FText::AsNumber(CurrentHealth));
	TextBlock_MaxHealth->SetText(FText::AsNumber(MaxHealth));
	ProgressBar_CurrentHealth->SetPercent(UKismetMathLibrary::NormalizeToRange(CurrentHealth, 0, MaxHealth));
}
